// 请求工具参考https://ext.dcloud.net.cn/plugin?id=392
const { http } = uni.$u
import website from '@/const/website'

export const weixinMiniAppLogin = (data = {}, header = {}) => http.post('/oauth/token', data, { header: header })
export const passwordLogin = (data = {}, header = {}) => http.post('/oauth/token', data, { header: header })
export const smsLogin = (data = {}) => http.post('/oauth/token', data)
// 刷新令牌
export const refreshToken = (data = {}, header = {}) => http.post('/oauth/token', data, { header: header })
// 绑定手机号 + 卡号
export const bindPhoneMall = (data = {}, header = website.headerForm) => http.get('/social/bind-phone-mall', { params: data, header: header })
// 发送手机验证码
export const sendSmsCode = (data = {}) => http.get('/mobile' + data.mobile, {})
// 退出登录
export const logout = (data = {}) => http.delete('/auth/token/logout', data)
